//
//  KKChatTextView.h
//  KKLiveDemo
//
//  Created by leo on 2017/7/29.
//  Copyright © 2017年 leo. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef void(^KKChatTextViewChangeContentHeightHandle)(CGFloat height);
typedef void(^KKChatTextViewDidEndEditTextHandle)(NSString *text);
typedef void(^KKChatTextViewDidEndEditCoreTextHandle)(NSAttributedString *text);

@interface KKChatTextView : UITextView<UITextViewDelegate>

@property (nonatomic, strong) KKChatTextViewChangeContentHeightHandle changeContentHeightHandle;
@property (nonatomic, strong) KKChatTextViewDidEndEditTextHandle didEndEditTextHandle;
@property (nonatomic, strong) KKChatTextViewDidEndEditCoreTextHandle didEndEditCoreTextHandle;

//  增加表情
- (void)kk_appendEmoticonImageIndex:(NSInteger)imageIndex;

//  清空文本
- (void)kk_cleanAllText;

@end

@interface KKChatCoreTextImageItem : NSObject
@property (nonatomic, assign) NSInteger imageIndex;     /**<图片的index*/
@property (nonatomic, assign) NSRange imageRange;       /**<图片的位置*/
@end


@interface KKTextAttachment:NSTextAttachment
@property (nonatomic, assign) NSInteger imageIndex;
@end
